<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>练习</title>
    <script>
        /* 函数练习 */

        var a = 123;

        function fun() {
            console.log("我是函数fun中的:" + a);
        }
        fun();

        var b = 123;

        function fun1() {
            console.log("我是函数fun1中的:" + b);
            var b = 456;
        }
        fun1();
        console.log("fun1我是全局中的：" + b);

        var c = 123;

        function fun3() {
            console.log("我是fun3中的：" + c);
            c = 456;
        }
        fun3();
        console.log("fun3我是全局中的" + c);

        var d = 123;

        function fun4(d) {
            console.log("我是fun4中的" + d);
            d = 456;
        }
        fun4();
        console.log("fun4我是全局中的" + d);

        var e = 123;

        function fun5(e) {
            console.log("我是fun5中的" + e);
            e = 456;
        }
        fun5(123);
        console.log("fun5我是全局中的" + e);
    </script>
</head>

<body>

</body>

</html>